package xyz.jangle.design.singleton;

public class AppMain17 {

	public static void main(String[] args) {
		
		for (int i = 0; i < 10; i++) {
			new Thread(()->{ 
				System.out.println("获取单例模式");
				Singleton instance = Singleton.getInstance();
				System.out.println("成功获取单例"+instance);
			}).start();
		}
		
		for (int i = 0; i < 10; i++) {
			new Thread(()->{ 
				System.out.println("获取单例模式");
				SingletonDouble instance = SingletonDouble.getInstance();
				System.out.println("成功获取单例"+instance);
			}).start();
		}
		
		for (int i = 0; i < 10; i++) {
			new Thread(()->{ 
				System.out.println("获取单例模式");
				SingletonInnerStatic instance = SingletonInnerStatic.getInstance();
				System.out.println("成功获取单例"+instance);
			}).start();
		}

	}

}

